<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Cheetah Software: SimulationBridge.cpp Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Cheetah Software
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
      <li><a href="../../globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('dc/da6/_simulation_bridge_8cpp_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">SimulationBridge.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../dc/da6/_simulation_bridge_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../db/d55/_simulation_bridge_8h.html">SimulationBridge.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;gui_main_control_settings_t.hpp&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d0/d41/_leg_controller_8h.html">Controllers/LegController.h</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d4/dd2/rt__interface__lcm_8h.html">rt/rt_interface_lcm.h</a>&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d1/d95/rt__sbus_8h.html">rt/rt_sbus.h</a>&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="../../d8/d3a/class_simulation_bridge.html#a0a9846e88d9afe3370ffe10db348a366">   13</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a0a9846e88d9afe3370ffe10db348a366">SimulationBridge::run</a>() {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  <span class="comment">// init shared memory:</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>.<a class="code" href="../../d1/d8d/class_shared_memory_object.html#a62656128cd792e54088e8f75315d05bc">attach</a>(<a class="code" href="../../d2/dac/_shared_memory_8h.html#a81248e6de8785a7320f0ae3d455c0298">DEVELOPMENT_SIMULATOR_SHARED_MEMORY_NAME</a>);</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().init();</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  <span class="comment">// init Quadruped Controller</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  printf(<span class="stringliteral">&quot;[Simulation Driver] Starting main loop...\n&quot;</span>);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  <span class="keywordtype">bool</span> firstRun = <span class="keyword">true</span>;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;  <span class="keywordflow">for</span> (;;) {</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="comment">// wait for our turn to access the shared memory</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="comment">// on the first loop, this gives the simulator a chance to put stuff in</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="comment">// shared memory before we start</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().waitForSimulator();</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordflow">if</span> (firstRun) {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;      firstRun = <span class="keyword">false</span>;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;      <span class="comment">// check that the robot type is correct:</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;      <span class="keywordflow">if</span> (<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a6459b5fcab18d19a2820b20914584b95">_robot</a> != <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.robotType) {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        printf(</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;            <span class="stringliteral">&quot;simulator and simulatorDriver don&#39;t agree on which robot we are &quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;            <span class="stringliteral">&quot;simulating (robot %d, sim %d)\n&quot;</span>,</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            (<span class="keywordtype">int</span>)<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a6459b5fcab18d19a2820b20914584b95">_robot</a>, (<span class="keywordtype">int</span>)<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.robotType);</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;robot mismatch!&quot;</span>);</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;      }</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    }</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="comment">// the simulator tells us which mode to run in</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#ad3b9d244d04d18684a64d3e55c20e19e">_simMode</a> = <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.mode;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">switch</span> (<a class="code" href="../../d8/d3a/class_simulation_bridge.html#ad3b9d244d04d18684a64d3e55c20e19e">_simMode</a>) {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;      <span class="keywordflow">case</span> <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4fa586d6fd9d775c897fdf1d14fbc9b0616">SimulatorMode::RUN_CONTROL_PARAMETERS</a>:  <span class="comment">// there is a new control</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                                                   <span class="comment">// parameter request</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <a class="code" href="../../d8/d3a/class_simulation_bridge.html#aba095e0bb12ca2f27d64e32015c397c1">handleControlParameters</a>();</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;      <span class="keywordflow">case</span> <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4faa438191831f2e6bd093884da88dd374f">SimulatorMode::RUN_CONTROLLER</a>:  <span class="comment">// the simulator is ready for the</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                                           <span class="comment">// next robot controller run</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <a class="code" href="../../d8/d3a/class_simulation_bridge.html#ab22199f9bf5b1d9713fb4ef22c1425f0">_iterations</a>++;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3396c7d142b6d3be5c65fc17adad05a0">runRobotControl</a>();</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;      <span class="keywordflow">case</span> <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4facd6102c4e0e339658526415ee06ad67d">SimulatorMode::DO_NOTHING</a>:  <span class="comment">// the simulator is just checking to see</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                                       <span class="comment">// if we are alive yet</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      <span class="keywordflow">case</span> <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4faa42b2fb0e720a080e79a92f4ca97d927">SimulatorMode::EXIT</a>:  <span class="comment">// the simulator is done with us</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        printf(<span class="stringliteral">&quot;[Simulation Driver] Transitioned to exit mode\n&quot;</span>);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">return</span>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;      <span class="keywordflow">default</span>:</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;unknown simulator mode&quot;</span>);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    }</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="comment">// tell the simulator we are done</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().robotIsDone();</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  }</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;}</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="../../d8/d3a/class_simulation_bridge.html#aba095e0bb12ca2f27d64e32015c397c1">   71</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/d3a/class_simulation_bridge.html#aba095e0bb12ca2f27d64e32015c397c1">SimulationBridge::handleControlParameters</a>() {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <a class="code" href="../../d6/d6d/struct_control_parameter_request.html">ControlParameterRequest</a>&amp; request =</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.controlParameterRequest;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <a class="code" href="../../d4/d34/struct_control_parameter_response.html">ControlParameterResponse</a>&amp; response =</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;      <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().robotToSim.controlParameterResponse;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="keywordflow">if</span> (request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a> &lt;= response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">requestNumber</a>) {</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="comment">// nothing to do!</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    printf(</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="stringliteral">&quot;[SimulationBridge] Warning: the simulator has run a ControlParameter &quot;</span></div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="stringliteral">&quot;iteration, but there is no new request!\n&quot;</span>);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  }</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="comment">// sanity check</span></div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <a class="code" href="../../d0/d99/c_types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> nRequests = request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a> - response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">requestNumber</a>;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  assert(nRequests == 1);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#aded69733cb3a4d17ac422c81cada1a32">nParameters</a> = <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3803c157ac6527bbcf8295b72c0ed74c">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">_map</a></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                             .size();  <span class="comment">// todo don&#39;t do this every single time?</span></div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="keywordflow">switch</span> (request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad991ed9045c129311774dc9ac4c97de7">requestKind</a>) {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb">ControlParameterRequestKind::SET_ROBOT_PARAM_BY_NAME</a>: {</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      std::string name(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad03bd9ffd8b4ed1dbcdd72a07fabc2d3">name</a>);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;      <a class="code" href="../../da/d98/class_control_parameter.html">ControlParameter</a>&amp; param = <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3803c157ac6527bbcf8295b72c0ed74c">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a9e6262aa46992ca879b50d70df030a56">lookup</a>(name);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;      <span class="comment">// type check</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;      <span class="keywordflow">if</span> (param.<a class="code" href="../../da/d98/class_control_parameter.html#a9bfcef0e53e248af51d60e013609ce8f">_kind</a> != request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>) {</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="keywordflow">throw</span> std::runtime_error(</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            <span class="stringliteral">&quot;type mismatch for parameter &quot;</span> + name + <span class="stringliteral">&quot;, robot thinks it is &quot;</span> +</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            <a class="code" href="../../d2/d01/_control_parameters_8h.html#a39a31ac35492a7e98110f7301430b5fe">controlParameterValueKindToString</a>(param.<a class="code" href="../../da/d98/class_control_parameter.html#a9bfcef0e53e248af51d60e013609ce8f">_kind</a>) +</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            <span class="stringliteral">&quot; but received a command to set it to &quot;</span> +</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            <a class="code" href="../../d2/d01/_control_parameters_8h.html#a39a31ac35492a7e98110f7301430b5fe">controlParameterValueKindToString</a>(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>));</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;      }</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;      <span class="comment">// do the actual set</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      param.<a class="code" href="../../da/d98/class_control_parameter.html#ac508d1f24bf918c65d717f5389553e83">set</a>(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#afcc0b006e83760030cde3ab151aca929">value</a>, request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;      <span class="comment">// respond:</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">requestNumber</a> =</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;          request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a>;  <span class="comment">// acknowledge that the set has happened</span></div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a92b038f05343b0724848ed37b70c59cc">parameterKind</a> =</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;          request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>;       <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a93360b8f44d7afcb47cd5c2a2efa0740">value</a> = request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#afcc0b006e83760030cde3ab151aca929">value</a>;  <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;      strcpy(response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ade6ee0a7cb7f80ca17ced8276ed3dac6">name</a>,</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;             name.c_str());  <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a906c0ffa498ea06e902662854020bd8d">requestKind</a> = request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad991ed9045c129311774dc9ac4c97de7">requestKind</a>;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;      printf(<span class="stringliteral">&quot;%s\n&quot;</span>, response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a62038efa1fc5e7447a7dc5cf4e6db97c">toString</a>().c_str());</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    } <span class="keywordflow">break</span>;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e">ControlParameterRequestKind::SET_USER_PARAM_BY_NAME</a>: {</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;      std::string name(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad03bd9ffd8b4ed1dbcdd72a07fabc2d3">name</a>);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      <span class="keywordflow">if</span>(!<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a114b8cfe51bd763fd3037bf3580ae13d">_userParams</a>) {</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        printf(<span class="stringliteral">&quot;[Simulation Bridge] Warning: tried to set user parameter, but the robot does not have any!\n&quot;</span>);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;      } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <a class="code" href="../../da/d98/class_control_parameter.html">ControlParameter</a>&amp; param = <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a114b8cfe51bd763fd3037bf3580ae13d">_userParams</a>-&gt;<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a9e6262aa46992ca879b50d70df030a56">lookup</a>(name);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="comment">// type check</span></div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordflow">if</span> (param.<a class="code" href="../../da/d98/class_control_parameter.html#a9bfcef0e53e248af51d60e013609ce8f">_kind</a> != request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>) {</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;          <span class="keywordflow">throw</span> std::runtime_error(</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;              <span class="stringliteral">&quot;type mismatch for parameter &quot;</span> + name + <span class="stringliteral">&quot;, robot thinks it is &quot;</span> +</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;              <a class="code" href="../../d2/d01/_control_parameters_8h.html#a39a31ac35492a7e98110f7301430b5fe">controlParameterValueKindToString</a>(param.<a class="code" href="../../da/d98/class_control_parameter.html#a9bfcef0e53e248af51d60e013609ce8f">_kind</a>) +</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;              <span class="stringliteral">&quot; but received a command to set it to &quot;</span> +</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;              <a class="code" href="../../d2/d01/_control_parameters_8h.html#a39a31ac35492a7e98110f7301430b5fe">controlParameterValueKindToString</a>(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>));</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        }</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="comment">// do the actual set</span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        param.<a class="code" href="../../da/d98/class_control_parameter.html#ac508d1f24bf918c65d717f5389553e83">set</a>(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#afcc0b006e83760030cde3ab151aca929">value</a>, request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;      }</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;      <span class="comment">// respond:</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">requestNumber</a> =</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;          request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a>;  <span class="comment">// acknowledge that the set has happened</span></div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a92b038f05343b0724848ed37b70c59cc">parameterKind</a> =</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;          request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>;       <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a93360b8f44d7afcb47cd5c2a2efa0740">value</a> = request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#afcc0b006e83760030cde3ab151aca929">value</a>;  <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;      strcpy(response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ade6ee0a7cb7f80ca17ced8276ed3dac6">name</a>,</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;             name.c_str());  <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a906c0ffa498ea06e902662854020bd8d">requestKind</a> = request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad991ed9045c129311774dc9ac4c97de7">requestKind</a>;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;      printf(<span class="stringliteral">&quot;%s\n&quot;</span>, response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a62038efa1fc5e7447a7dc5cf4e6db97c">toString</a>().c_str());</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    } <span class="keywordflow">break</span>;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508acb4d0852c8c2f31c2f9c307dc8892219">ControlParameterRequestKind::GET_ROBOT_PARAM_BY_NAME</a>: {</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      std::string name(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad03bd9ffd8b4ed1dbcdd72a07fabc2d3">name</a>);</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;      <a class="code" href="../../da/d98/class_control_parameter.html">ControlParameter</a>&amp; param = <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3803c157ac6527bbcf8295b72c0ed74c">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a9e6262aa46992ca879b50d70df030a56">lookup</a>(name);</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;      <span class="comment">// type check</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;      <span class="keywordflow">if</span> (param.<a class="code" href="../../da/d98/class_control_parameter.html#a9bfcef0e53e248af51d60e013609ce8f">_kind</a> != request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>) {</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <span class="keywordflow">throw</span> std::runtime_error(</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            <span class="stringliteral">&quot;type mismatch for parameter &quot;</span> + name + <span class="stringliteral">&quot;, robot thinks it is &quot;</span> +</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            <a class="code" href="../../d2/d01/_control_parameters_8h.html#a39a31ac35492a7e98110f7301430b5fe">controlParameterValueKindToString</a>(param.<a class="code" href="../../da/d98/class_control_parameter.html#a9bfcef0e53e248af51d60e013609ce8f">_kind</a>) +</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;            <span class="stringliteral">&quot; but received a command to set it to &quot;</span> +</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;            <a class="code" href="../../d2/d01/_control_parameters_8h.html#a39a31ac35492a7e98110f7301430b5fe">controlParameterValueKindToString</a>(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>));</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;      }</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;      <span class="comment">// respond</span></div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a93360b8f44d7afcb47cd5c2a2efa0740">value</a> = param.<a class="code" href="../../da/d98/class_control_parameter.html#a7f99bfb6f7efc528ec1487f7caf57bba">get</a>(request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">requestNumber</a> = request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">requestNumber</a>;  <span class="comment">// acknowledge</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a92b038f05343b0724848ed37b70c59cc">parameterKind</a> =</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;          request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">parameterKind</a>;  <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;      strcpy(response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#ade6ee0a7cb7f80ca17ced8276ed3dac6">name</a>,</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;             name.c_str());  <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;      response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a906c0ffa498ea06e902662854020bd8d">requestKind</a> =</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;          request.<a class="code" href="../../d6/d6d/struct_control_parameter_request.html#ad991ed9045c129311774dc9ac4c97de7">requestKind</a>;  <span class="comment">// just for debugging print statements</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;      printf(<span class="stringliteral">&quot;%s\n&quot;</span>, response.<a class="code" href="../../d4/d34/struct_control_parameter_response.html#a62038efa1fc5e7447a7dc5cf4e6db97c">toString</a>().c_str());</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    } <span class="keywordflow">break</span>;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="keywordflow">default</span>:</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;      <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;unhandled get/set&quot;</span>);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  }</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;}</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="../../d8/d3a/class_simulation_bridge.html#a3396c7d142b6d3be5c65fc17adad05a0">  186</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3396c7d142b6d3be5c65fc17adad05a0">SimulationBridge::runRobotControl</a>() {</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a57b32122733293ff101b108564ffcd70">_firstControllerRun</a>) {</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    printf(<span class="stringliteral">&quot;[Simulator Driver] First run of robot controller...\n&quot;</span>);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3803c157ac6527bbcf8295b72c0ed74c">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a12b144b3d659080b6e0bfd93569b566e">isFullyInitialized</a>()) {</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;      printf(<span class="stringliteral">&quot;\tAll %ld control parameters are initialized\n&quot;</span>,</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;             <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3803c157ac6527bbcf8295b72c0ed74c">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">collection</a>.<a class="code" href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">_map</a>.size());</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;      printf(</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;          <span class="stringliteral">&quot;\tbut not all control parameters were initialized. Missing:\n%s\n&quot;</span>,</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;          <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3803c157ac6527bbcf8295b72c0ed74c">_robotParams</a>.<a class="code" href="../../d8/d86/class_control_parameters.html#a6fc860c65c6484562dfc922cb5806410">generateUnitializedList</a>().c_str());</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;      <span class="keywordflow">throw</span> std::runtime_error(</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;          <span class="stringliteral">&quot;not all parameters initialized when going into RUN_CONTROLLER&quot;</span>);</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    }</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keyword">auto</span>* userControlParameters = <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a22049e420073df0f4f7c0df114b5e917">_robot_ctrl</a>-&gt;<a class="code" href="../../d4/d6a/class_robot_controller.html#a4f978bdc5c1e5c868ca578f1061489e7">getUserControlParameters</a>();</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="keywordflow">if</span>(userControlParameters) {</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;      <span class="keywordflow">if</span> (userControlParameters-&gt;isFullyInitialized()) {</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        printf(<span class="stringliteral">&quot;\tAll %ld user parameters are initialized\n&quot;</span>,</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;               userControlParameters-&gt;collection._map.size());</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <a class="code" href="../../d8/d3a/class_simulation_bridge.html#ad3b9d244d04d18684a64d3e55c20e19e">_simMode</a> = <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4faa438191831f2e6bd093884da88dd374f">SimulatorMode::RUN_CONTROLLER</a>;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;      } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        printf(</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            <span class="stringliteral">&quot;\tbut not all control parameters were initialized. Missing:\n%s\n&quot;</span>,</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            userControlParameters-&gt;generateUnitializedList().c_str());</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        <span class="keywordflow">throw</span> std::runtime_error(</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            <span class="stringliteral">&quot;not all parameters initialized when going into RUN_CONTROLLER&quot;</span>);</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;      }</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;      <a class="code" href="../../d8/d3a/class_simulation_bridge.html#ad3b9d244d04d18684a64d3e55c20e19e">_simMode</a> = <a class="code" href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4faa438191831f2e6bd093884da88dd374f">SimulatorMode::RUN_CONTROLLER</a>;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    }</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#ab68a04d6b506333426883633a6430656">driverCommand</a> =</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        &amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.gamepadCommand;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a58767b23c3b78f2d6f7a5af7474d39cf">spiData</a> = &amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.spiData;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#ac50170ed61462e6b473a8b4123252b06">tiBoardData</a> = <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.tiBoardData;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#ac36f7f6395167f998afe23f6d4f86c82">robotType</a> = <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a6459b5fcab18d19a2820b20914584b95">_robot</a>;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a556fa8680fbd044ace2e0ac66db6c0ff">vectorNavData</a> = &amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.vectorNav;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a0c0ed1f15b551e355dd724696830d9ce">cheaterState</a> = &amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().simToRobot.cheaterState;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a13f4f83d3364befdad7a218f2c16afbb">spiCommand</a> = &amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().robotToSim.spiCommand;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a0f2ce3493eb24f284097c191bd46878b">tiBoardCommand</a> =</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().robotToSim.tiBoardCommand;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a1738f8f82abdedc10c25e0360fba2dec">controlParameters</a> = &amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a3803c157ac6527bbcf8295b72c0ed74c">_robotParams</a>;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a8c74848e52f20b1294d650641f40ea4f">visualizationData</a> =</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;        &amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().robotToSim.visualizationData;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#ad49f79affbf6c35d4c8ac21a50cb8ae3">cheetahMainVisualization</a> =</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        &amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">_sharedMemory</a>().robotToSim.mainCheetahVisualization;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#affa2cfda073a7b1742561154c3081ae5">init</a>();</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a57b32122733293ff101b108564ffcd70">_firstControllerRun</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a18c0f68d6dcc2f81a011fc5a4f00f44f">sbus_thread</a> = <span class="keyword">new</span> std::thread(&amp;<a class="code" href="../../d8/d3a/class_simulation_bridge.html#aad85f4ea0a490daed77d90efff2dcc92">SimulationBridge::run_sbus</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  }</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;  <a class="code" href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">_robotRunner</a>-&gt;<a class="code" href="../../d9/d42/class_robot_runner.html#a00f9204f3367b9948a2053e66d92c844">run</a>();</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;}</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="../../d8/d3a/class_simulation_bridge.html#aad85f4ea0a490daed77d90efff2dcc92">  242</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/d3a/class_simulation_bridge.html#aad85f4ea0a490daed77d90efff2dcc92">SimulationBridge::run_sbus</a>() {</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  printf(<span class="stringliteral">&quot;[run_sbus] starting...\n&quot;</span>);</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;  <span class="keywordtype">int</span> port = <a class="code" href="../../d1/d95/rt__sbus_8h.html#a1f8bbf50154d9822f453616920c26127">init_sbus</a>(<span class="keyword">true</span>);  <span class="comment">// Simulation</span></div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;  <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <span class="keywordflow">if</span> (port &gt; 0) {</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;      <span class="keywordtype">int</span> x = <a class="code" href="../../d1/d95/rt__sbus_8h.html#ab44d038981e16325d8aec78b2c1011bf">receive_sbus</a>(port);</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;      <span class="keywordflow">if</span> (x) {</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <a class="code" href="../../d4/dd2/rt__interface__lcm_8h.html#a3f348fdbac738fe554e4543dee262081">sbus_packet_complete</a>();</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;      }</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    }</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    usleep(5000);</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;  }</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;}</div><div class="ttc" id="struct_control_parameter_response_html_a906c0ffa498ea06e902662854020bd8d"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#a906c0ffa498ea06e902662854020bd8d">ControlParameterResponse::requestKind</a></div><div class="ttdeci">ControlParameterRequestKind requestKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00069">ControlParameterInterface.h:69</a></div></div>
<div class="ttc" id="class_robot_runner_html_a13f4f83d3364befdad7a218f2c16afbb"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a13f4f83d3364befdad7a218f2c16afbb">RobotRunner::spiCommand</a></div><div class="ttdeci">SpiCommand * spiCommand</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00051">RobotRunner.h:51</a></div></div>
<div class="ttc" id="_control_parameter_interface_8h_html_ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb"><div class="ttname"><a href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a592d3b9333f88bfabfaa2b00fb225ebb">ControlParameterRequestKind::SET_ROBOT_PARAM_BY_NAME</a></div></div>
<div class="ttc" id="class_robot_runner_html_ac50170ed61462e6b473a8b4123252b06"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#ac50170ed61462e6b473a8b4123252b06">RobotRunner::tiBoardData</a></div><div class="ttdeci">TiBoardData * tiBoardData</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00053">RobotRunner.h:53</a></div></div>
<div class="ttc" id="class_robot_runner_html_a58767b23c3b78f2d6f7a5af7474d39cf"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a58767b23c3b78f2d6f7a5af7474d39cf">RobotRunner::spiData</a></div><div class="ttdeci">SpiData * spiData</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00050">RobotRunner.h:50</a></div></div>
<div class="ttc" id="class_control_parameters_html_ab42dff0f07e88bf44c831238dd4ce96f"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#ab42dff0f07e88bf44c831238dd4ce96f">ControlParameters::collection</a></div><div class="ttdeci">ControlParameterCollection collection</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00441">ControlParameters.h:441</a></div></div>
<div class="ttc" id="class_control_parameter_html_a9bfcef0e53e248af51d60e013609ce8f"><div class="ttname"><a href="../../da/d98/class_control_parameter.html#a9bfcef0e53e248af51d60e013609ce8f">ControlParameter::_kind</a></div><div class="ttdeci">ControlParameterValueKind _kind</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00381">ControlParameters.h:381</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_ab47135adbd2c1249dfa24d264732a76f"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#ab47135adbd2c1249dfa24d264732a76f">ControlParameterRequest::parameterKind</a></div><div class="ttdeci">ControlParameterValueKind parameterKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00031">ControlParameterInterface.h:31</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a114b8cfe51bd763fd3037bf3580ae13d"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a114b8cfe51bd763fd3037bf3580ae13d">SimulationBridge::_userParams</a></div><div class="ttdeci">ControlParameters * _userParams</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00045">SimulationBridge.h:45</a></div></div>
<div class="ttc" id="_control_parameters_8h_html_a39a31ac35492a7e98110f7301430b5fe"><div class="ttname"><a href="../../d2/d01/_control_parameters_8h.html#a39a31ac35492a7e98110f7301430b5fe">controlParameterValueKindToString</a></div><div class="ttdeci">std::string controlParameterValueKindToString(ControlParameterValueKind valueKind)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d90/_control_parameters_8cpp_source.html#l00016">ControlParameters.cpp:16</a></div></div>
<div class="ttc" id="class_control_parameter_collection_html_a10baad903728358f310f523c45e0326c"><div class="ttname"><a href="../../dd/da1/class_control_parameter_collection.html#a10baad903728358f310f523c45e0326c">ControlParameterCollection::_map</a></div><div class="ttdeci">std::map&lt; std::string, ControlParameter * &gt; _map</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00114">ControlParameters.h:114</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_a62038efa1fc5e7447a7dc5cf4e6db97c"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#a62038efa1fc5e7447a7dc5cf4e6db97c">ControlParameterResponse::toString</a></div><div class="ttdeci">std::string toString()</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00077">ControlParameterInterface.h:77</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_a93360b8f44d7afcb47cd5c2a2efa0740"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#a93360b8f44d7afcb47cd5c2a2efa0740">ControlParameterResponse::value</a></div><div class="ttdeci">ControlParameterValue value</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00067">ControlParameterInterface.h:67</a></div></div>
<div class="ttc" id="class_robot_runner_html_a556fa8680fbd044ace2e0ac66db6c0ff"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a556fa8680fbd044ace2e0ac66db6c0ff">RobotRunner::vectorNavData</a></div><div class="ttdeci">VectorNavData * vectorNavData</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00048">RobotRunner.h:48</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a18c0f68d6dcc2f81a011fc5a4f00f44f"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a18c0f68d6dcc2f81a011fc5a4f00f44f">SimulationBridge::sbus_thread</a></div><div class="ttdeci">std::thread * sbus_thread</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00048">SimulationBridge.h:48</a></div></div>
<div class="ttc" id="class_control_parameters_html_a12b144b3d659080b6e0bfd93569b566e"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a12b144b3d659080b6e0bfd93569b566e">ControlParameters::isFullyInitialized</a></div><div class="ttdeci">bool isFullyInitialized()</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00403">ControlParameters.h:403</a></div></div>
<div class="ttc" id="rt__interface__lcm_8h_html"><div class="ttname"><a href="../../d4/dd2/rt__interface__lcm_8h.html">rt_interface_lcm.h</a></div></div>
<div class="ttc" id="class_robot_runner_html_a00f9204f3367b9948a2053e66d92c844"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a00f9204f3367b9948a2053e66d92c844">RobotRunner::run</a></div><div class="ttdeci">void run() override</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d28/_robot_runner_8cpp_source.html#l00067">RobotRunner.cpp:67</a></div></div>
<div class="ttc" id="class_control_parameter_html"><div class="ttname"><a href="../../da/d98/class_control_parameter.html">ControlParameter</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00120">ControlParameters.h:120</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_ad991ed9045c129311774dc9ac4c97de7"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#ad991ed9045c129311774dc9ac4c97de7">ControlParameterRequest::requestKind</a></div><div class="ttdeci">ControlParameterRequestKind requestKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00032">ControlParameterInterface.h:32</a></div></div>
<div class="ttc" id="_simulator_message_8h_html_a486e39cd4b287080b175f8736f67de4facd6102c4e0e339658526415ee06ad67d"><div class="ttname"><a href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4facd6102c4e0e339658526415ee06ad67d">SimulatorMode::DO_NOTHING</a></div></div>
<div class="ttc" id="class_robot_runner_html_a0f2ce3493eb24f284097c191bd46878b"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a0f2ce3493eb24f284097c191bd46878b">RobotRunner::tiBoardCommand</a></div><div class="ttdeci">TiBoardCommand * tiBoardCommand</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00052">RobotRunner.h:52</a></div></div>
<div class="ttc" id="_control_parameter_interface_8h_html_ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e"><div class="ttname"><a href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508a7cd01036768fe3a9f7f5cccc148f833e">ControlParameterRequestKind::SET_USER_PARAM_BY_NAME</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_aba095e0bb12ca2f27d64e32015c397c1"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#aba095e0bb12ca2f27d64e32015c397c1">SimulationBridge::handleControlParameters</a></div><div class="ttdeci">void handleControlParameters()</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/da6/_simulation_bridge_8cpp_source.html#l00071">SimulationBridge.cpp:71</a></div></div>
<div class="ttc" id="class_shared_memory_object_html_a62656128cd792e54088e8f75315d05bc"><div class="ttname"><a href="../../d1/d8d/class_shared_memory_object.html#a62656128cd792e54088e8f75315d05bc">SharedMemoryObject::attach</a></div><div class="ttdeci">void attach(const std::string &amp;name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dac/_shared_memory_8h_source.html#l00191">SharedMemory.h:191</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_ad03bd9ffd8b4ed1dbcdd72a07fabc2d3"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#ad03bd9ffd8b4ed1dbcdd72a07fabc2d3">ControlParameterRequest::name</a></div><div class="ttdeci">char name[CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH]</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00027">ControlParameterInterface.h:27</a></div></div>
<div class="ttc" id="class_robot_runner_html_affa2cfda073a7b1742561154c3081ae5"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#affa2cfda073a7b1742561154c3081ae5">RobotRunner::init</a></div><div class="ttdeci">void init() override</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d28/_robot_runner_8cpp_source.html#l00028">RobotRunner.cpp:28</a></div></div>
<div class="ttc" id="class_control_parameter_html_ac508d1f24bf918c65d717f5389553e83"><div class="ttname"><a href="../../da/d98/class_control_parameter.html#ac508d1f24bf918c65d717f5389553e83">ControlParameter::set</a></div><div class="ttdeci">void set(ControlParameterValue value, ControlParameterValueKind kind)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00252">ControlParameters.h:252</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_a92b038f05343b0724848ed37b70c59cc"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#a92b038f05343b0724848ed37b70c59cc">ControlParameterResponse::parameterKind</a></div><div class="ttdeci">ControlParameterValueKind parameterKind</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00068">ControlParameterInterface.h:68</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a57b32122733293ff101b108564ffcd70"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a57b32122733293ff101b108564ffcd70">SimulationBridge::_firstControllerRun</a></div><div class="ttdeci">bool _firstControllerRun</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00038">SimulationBridge.h:38</a></div></div>
<div class="ttc" id="_shared_memory_8h_html_a81248e6de8785a7320f0ae3d455c0298"><div class="ttname"><a href="../../d2/dac/_shared_memory_8h.html#a81248e6de8785a7320f0ae3d455c0298">DEVELOPMENT_SIMULATOR_SHARED_MEMORY_NAME</a></div><div class="ttdeci">#define DEVELOPMENT_SIMULATOR_SHARED_MEMORY_NAME</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dac/_shared_memory_8h_source.html#l00021">SharedMemory.h:21</a></div></div>
<div class="ttc" id="rt__interface__lcm_8h_html_a3f348fdbac738fe554e4543dee262081"><div class="ttname"><a href="../../d4/dd2/rt__interface__lcm_8h.html#a3f348fdbac738fe554e4543dee262081">sbus_packet_complete</a></div><div class="ttdeci">void sbus_packet_complete()</div><div class="ttdoc">Function which handles the completion of an SBUS Packet and overrides the LCM control settings as des...</div><div class="ttdef"><b>Definition:</b> <a href="../../dd/df1/rt__interface__lcm_8cpp_source.html#l00078">rt_interface_lcm.cpp:78</a></div></div>
<div class="ttc" id="class_robot_runner_html_ab68a04d6b506333426883633a6430656"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#ab68a04d6b506333426883633a6430656">RobotRunner::driverCommand</a></div><div class="ttdeci">GamepadCommand * driverCommand</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00046">RobotRunner.h:46</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a6459b5fcab18d19a2820b20914584b95"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a6459b5fcab18d19a2820b20914584b95">SimulationBridge::_robot</a></div><div class="ttdeci">RobotType _robot</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00040">SimulationBridge.h:40</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_ac73006eb720e25486d3937bdf2657c2c"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#ac73006eb720e25486d3937bdf2657c2c">ControlParameterResponse::requestNumber</a></div><div class="ttdeci">u64 requestNumber</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00065">ControlParameterInterface.h:65</a></div></div>
<div class="ttc" id="class_robot_runner_html_ad49f79affbf6c35d4c8ac21a50cb8ae3"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#ad49f79affbf6c35d4c8ac21a50cb8ae3">RobotRunner::cheetahMainVisualization</a></div><div class="ttdeci">CheetahVisualization * cheetahMainVisualization</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00056">RobotRunner.h:56</a></div></div>
<div class="ttc" id="rt__sbus_8h_html_a1f8bbf50154d9822f453616920c26127"><div class="ttname"><a href="../../d1/d95/rt__sbus_8h.html#a1f8bbf50154d9822f453616920c26127">init_sbus</a></div><div class="ttdeci">int init_sbus(int is_simulator)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dad/rt__sbus_8cpp_source.html#l00119">rt_sbus.cpp:119</a></div></div>
<div class="ttc" id="class_control_parameter_collection_html_a9e6262aa46992ca879b50d70df030a56"><div class="ttname"><a href="../../dd/da1/class_control_parameter_collection.html#a9e6262aa46992ca879b50d70df030a56">ControlParameterCollection::lookup</a></div><div class="ttdeci">ControlParameter &amp; lookup(const std::string &amp;name)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00095">ControlParameters.h:95</a></div></div>
<div class="ttc" id="class_control_parameter_html_a7f99bfb6f7efc528ec1487f7caf57bba"><div class="ttname"><a href="../../da/d98/class_control_parameter.html#a7f99bfb6f7efc528ec1487f7caf57bba">ControlParameter::get</a></div><div class="ttdeci">ControlParameterValue get(ControlParameterValueKind kind)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/d01/_control_parameters_8h_source.html#l00282">ControlParameters.h:282</a></div></div>
<div class="ttc" id="class_robot_runner_html_a1738f8f82abdedc10c25e0360fba2dec"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a1738f8f82abdedc10c25e0360fba2dec">RobotRunner::controlParameters</a></div><div class="ttdeci">RobotControlParameters * controlParameters</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00054">RobotRunner.h:54</a></div></div>
<div class="ttc" id="_simulator_message_8h_html_a486e39cd4b287080b175f8736f67de4faa42b2fb0e720a080e79a92f4ca97d927"><div class="ttname"><a href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4faa42b2fb0e720a080e79a92f4ca97d927">SimulatorMode::EXIT</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_aad85f4ea0a490daed77d90efff2dcc92"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#aad85f4ea0a490daed77d90efff2dcc92">SimulationBridge::run_sbus</a></div><div class="ttdeci">void run_sbus()</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/da6/_simulation_bridge_8cpp_source.html#l00242">SimulationBridge.cpp:242</a></div></div>
<div class="ttc" id="_simulator_message_8h_html_a486e39cd4b287080b175f8736f67de4fa586d6fd9d775c897fdf1d14fbc9b0616"><div class="ttname"><a href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4fa586d6fd9d775c897fdf1d14fbc9b0616">SimulatorMode::RUN_CONTROL_PARAMETERS</a></div></div>
<div class="ttc" id="class_robot_runner_html_a0c0ed1f15b551e355dd724696830d9ce"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a0c0ed1f15b551e355dd724696830d9ce">RobotRunner::cheaterState</a></div><div class="ttdeci">CheaterState&lt; double &gt; * cheaterState</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00049">RobotRunner.h:49</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_aded69733cb3a4d17ac422c81cada1a32"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#aded69733cb3a4d17ac422c81cada1a32">ControlParameterResponse::nParameters</a></div><div class="ttdeci">u64 nParameters</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00066">ControlParameterInterface.h:66</a></div></div>
<div class="ttc" id="_leg_controller_8h_html"><div class="ttname"><a href="../../d0/d41/_leg_controller_8h.html">LegController.h</a></div><div class="ttdoc">Common Leg Control Interface and Leg Control Algorithms. </div></div>
<div class="ttc" id="class_simulation_bridge_html_ab22199f9bf5b1d9713fb4ef22c1425f0"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#ab22199f9bf5b1d9713fb4ef22c1425f0">SimulationBridge::_iterations</a></div><div class="ttdeci">u64 _iterations</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00046">SimulationBridge.h:46</a></div></div>
<div class="ttc" id="_simulator_message_8h_html_a486e39cd4b287080b175f8736f67de4faa438191831f2e6bd093884da88dd374f"><div class="ttname"><a href="../../d1/db1/_simulator_message_8h.html#a486e39cd4b287080b175f8736f67de4faa438191831f2e6bd093884da88dd374f">SimulatorMode::RUN_CONTROLLER</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html_ade6ee0a7cb7f80ca17ced8276ed3dac6"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html#ade6ee0a7cb7f80ca17ced8276ed3dac6">ControlParameterResponse::name</a></div><div class="ttdeci">char name[CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH]</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00064">ControlParameterInterface.h:64</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_a7499c6aedd179056b9615b8c00fffb9f"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#a7499c6aedd179056b9615b8c00fffb9f">ControlParameterRequest::requestNumber</a></div><div class="ttdeci">u64 requestNumber</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00029">ControlParameterInterface.h:29</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html_afcc0b006e83760030cde3ab151aca929"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html#afcc0b006e83760030cde3ab151aca929">ControlParameterRequest::value</a></div><div class="ttdeci">ControlParameterValue value</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00030">ControlParameterInterface.h:30</a></div></div>
<div class="ttc" id="class_robot_controller_html_a4f978bdc5c1e5c868ca578f1061489e7"><div class="ttname"><a href="../../d4/d6a/class_robot_controller.html#a4f978bdc5c1e5c868ca578f1061489e7">RobotController::getUserControlParameters</a></div><div class="ttdeci">virtual ControlParameters * getUserControlParameters()=0</div></div>
<div class="ttc" id="rt__sbus_8h_html"><div class="ttname"><a href="../../d1/d95/rt__sbus_8h.html">rt_sbus.h</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_ad3b9d244d04d18684a64d3e55c20e19e"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#ad3b9d244d04d18684a64d3e55c20e19e">SimulationBridge::_simMode</a></div><div class="ttdeci">SimulatorMode _simMode</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00042">SimulationBridge.h:42</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a80ab359271fc570d90edc2312f9b7ba5"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a80ab359271fc570d90edc2312f9b7ba5">SimulationBridge::_robotRunner</a></div><div class="ttdeci">RobotRunner * _robotRunner</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00041">SimulationBridge.h:41</a></div></div>
<div class="ttc" id="_control_parameter_interface_8h_html_ae6908d6ad8ae0bc7a200141e0c292508acb4d0852c8c2f31c2f9c307dc8892219"><div class="ttname"><a href="../../d6/de9/_control_parameter_interface_8h.html#ae6908d6ad8ae0bc7a200141e0c292508acb4d0852c8c2f31c2f9c307dc8892219">ControlParameterRequestKind::GET_ROBOT_PARAM_BY_NAME</a></div></div>
<div class="ttc" id="c_types_8h_html_a3f7e2bcbb0b4c338f3c4f6c937cd4234"><div class="ttname"><a href="../../d0/d99/c_types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a></div><div class="ttdeci">uint64_t u64</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d99/c_types_8h_source.html#l00017">cTypes.h:17</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a3803c157ac6527bbcf8295b72c0ed74c"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a3803c157ac6527bbcf8295b72c0ed74c">SimulationBridge::_robotParams</a></div><div class="ttdeci">RobotControlParameters _robotParams</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00044">SimulationBridge.h:44</a></div></div>
<div class="ttc" id="rt__sbus_8h_html_ab44d038981e16325d8aec78b2c1011bf"><div class="ttname"><a href="../../d1/d95/rt__sbus_8h.html#ab44d038981e16325d8aec78b2c1011bf">receive_sbus</a></div><div class="ttdeci">int receive_sbus(int port)</div><div class="ttdef"><b>Definition:</b> <a href="../../d2/dad/rt__sbus_8cpp_source.html#l00108">rt_sbus.cpp:108</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a3396c7d142b6d3be5c65fc17adad05a0"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a3396c7d142b6d3be5c65fc17adad05a0">SimulationBridge::runRobotControl</a></div><div class="ttdeci">void runRobotControl()</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/da6/_simulation_bridge_8cpp_source.html#l00186">SimulationBridge.cpp:186</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a0a9846e88d9afe3370ffe10db348a366"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a0a9846e88d9afe3370ffe10db348a366">SimulationBridge::run</a></div><div class="ttdeci">void run()</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/da6/_simulation_bridge_8cpp_source.html#l00013">SimulationBridge.cpp:13</a></div></div>
<div class="ttc" id="_simulation_bridge_8h_html"><div class="ttname"><a href="../../db/d55/_simulation_bridge_8h.html">SimulationBridge.h</a></div></div>
<div class="ttc" id="class_robot_runner_html_a8c74848e52f20b1294d650641f40ea4f"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a8c74848e52f20b1294d650641f40ea4f">RobotRunner::visualizationData</a></div><div class="ttdeci">VisualizationData * visualizationData</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00055">RobotRunner.h:55</a></div></div>
<div class="ttc" id="struct_control_parameter_response_html"><div class="ttname"><a href="../../d4/d34/struct_control_parameter_response.html">ControlParameterResponse</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00063">ControlParameterInterface.h:63</a></div></div>
<div class="ttc" id="class_simulation_bridge_html_a1908f01e149137b0521bd94cddd7e099"><div class="ttname"><a href="../../d8/d3a/class_simulation_bridge.html#a1908f01e149137b0521bd94cddd7e099">SimulationBridge::_sharedMemory</a></div><div class="ttdeci">SharedMemoryObject&lt; SimulatorSyncronizedMessage &gt; _sharedMemory</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d55/_simulation_bridge_8h_source.html#l00043">SimulationBridge.h:43</a></div></div>
<div class="ttc" id="class_control_parameters_html_a6fc860c65c6484562dfc922cb5806410"><div class="ttname"><a href="../../d8/d86/class_control_parameters.html#a6fc860c65c6484562dfc922cb5806410">ControlParameters::generateUnitializedList</a></div><div class="ttdeci">std::string generateUnitializedList()</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d90/_control_parameters_8cpp_source.html#l00089">ControlParameters.cpp:89</a></div></div>
<div class="ttc" id="class_robot_runner_html_a22049e420073df0f4f7c0df114b5e917"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#a22049e420073df0f4f7c0df114b5e917">RobotRunner::_robot_ctrl</a></div><div class="ttdeci">RobotController * _robot_ctrl</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00044">RobotRunner.h:44</a></div></div>
<div class="ttc" id="class_robot_runner_html_ac36f7f6395167f998afe23f6d4f86c82"><div class="ttname"><a href="../../d9/d42/class_robot_runner.html#ac36f7f6395167f998afe23f6d4f86c82">RobotRunner::robotType</a></div><div class="ttdeci">RobotType robotType</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d41/_robot_runner_8h_source.html#l00047">RobotRunner.h:47</a></div></div>
<div class="ttc" id="struct_control_parameter_request_html"><div class="ttname"><a href="../../d6/d6d/struct_control_parameter_request.html">ControlParameterRequest</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/_control_parameter_interface_8h_source.html#l00026">ControlParameterInterface.h:26</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="../../dir_61bfb0b3cdda81b1b0355ba34eb3b1eb.html">dhkim</a></li><li class="navelem"><a class="el" href="../../dir_adee5b101e079090017bb4e91c628ead.html">Public_Repository</a></li><li class="navelem"><a class="el" href="../../dir_7fc07a7b97001e7b1d18e11da761e2de.html">Cheetah-Software</a></li><li class="navelem"><a class="el" href="../../dir_e69772fee2c25f3f3a3da98250dcdda2.html">robot</a></li><li class="navelem"><a class="el" href="../../dir_027de6e2baa5cad9e7e386445d8c74b0.html">src</a></li><li class="navelem"><a class="el" href="../../dc/da6/_simulation_bridge_8cpp.html">SimulationBridge.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
